import React from 'react'
import { RouteState } from '../../router/routes'
import { NavLink } from 'react-router-dom'

import './style.css'
interface PropsState {
	routes: RouteState[]
}


export const TabBar: React.FC<PropsState> = ({ routes }) => {
	return (
		<div className='tabBar'>
			{
				routes.length > 0 && routes.map((v, i) => {
					return <NavLink key={i} to={ v.path }>{ v.title }</NavLink>
				})
			}
		</div>
	)
}

